import request from '@/utils/request'

export function getAllInfo() {
  return request({
    url: '/andon_problem/type/all',
    method: 'get'
  })
}

export function getInfo(query) {
  return request({
    url: '/andon_problem/type/page',
    method: 'get',
    params: query
  })
}

export function add(data) {
  return request({
    url: '/andon_problem/type',
    method: 'post',
    data
  })
}

export function update(id, data) {
  return request({
    url: `/andon_problem/type/${id}`,
    method: 'put',
    data
  })
}

export function deleteInfo(id) {
  return request({
    url: `/andon_problem/type/${id}`,
    method: 'delete'
  })
}
